package com.ruoyi.welder.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.welder.mapper.WelderBasicInfoMapper;
import com.ruoyi.welder.domain.WelderBasicInfo;
import com.ruoyi.welder.service.IWelderBasicInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 焊工基本信息管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-01-04
 */
@Service
public class WelderBasicInfoServiceImpl implements IWelderBasicInfoService 
{
    @Autowired
    private WelderBasicInfoMapper welderBasicInfoMapper;

    /**
     * 查询焊工基本信息管理
     * 
     * @param welderName 焊工基本信息管理主键
     * @return 焊工基本信息管理
     */
    @Override
    public WelderBasicInfo selectWelderBasicInfoByWelderName(String welderName)
    {
        return welderBasicInfoMapper.selectWelderBasicInfoByWelderName(welderName);
    }

    /**
     * 查询焊工基本信息管理列表
     * 
     * @param welderBasicInfo 焊工基本信息管理
     * @return 焊工基本信息管理
     */
    @Override
    public List<WelderBasicInfo> selectWelderBasicInfoList(WelderBasicInfo welderBasicInfo)
    {
        return welderBasicInfoMapper.selectWelderBasicInfoList(welderBasicInfo);
    }

    /**
     * 新增焊工基本信息管理
     * 
     * @param welderBasicInfo 焊工基本信息管理
     * @return 结果
     */
    @Override
    public int insertWelderBasicInfo(WelderBasicInfo welderBasicInfo)
    {
        welderBasicInfo.setCreateTime(DateUtils.getNowDate());
        return welderBasicInfoMapper.insertWelderBasicInfo(welderBasicInfo);
    }

    /**
     * 修改焊工基本信息管理
     * 
     * @param welderBasicInfo 焊工基本信息管理
     * @return 结果
     */
    @Override
    public int updateWelderBasicInfo(WelderBasicInfo welderBasicInfo)
    {
        welderBasicInfo.setUpdateTime(DateUtils.getNowDate());
        return welderBasicInfoMapper.updateWelderBasicInfo(welderBasicInfo);
    }

    /**
     * 批量删除焊工基本信息管理
     * 
     * @param welderNames 需要删除的焊工基本信息管理主键
     * @return 结果
     */
    @Override
    public int deleteWelderBasicInfoByWelderNames(String welderNames)
    {
        return welderBasicInfoMapper.deleteWelderBasicInfoByWelderNames(Convert.toStrArray(welderNames));
    }

    /**
     * 删除焊工基本信息管理信息
     * 
     * @param welderName 焊工基本信息管理主键
     * @return 结果
     */
    @Override
    public int deleteWelderBasicInfoByWelderName(String welderName)
    {
        return welderBasicInfoMapper.deleteWelderBasicInfoByWelderName(welderName);
    }
}
